﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--    <meta http-equiv="refresh" content="30">-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link rel="stylesheet" href="css/style.css" />
    <title>卡门新开店跟进表</title>
    <link href="css/index.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-1.8.1.min.js" type="text/javascript"></script>
</head>
<body>
    <div class="Top_Record">
        <div style="width: 100%">
            <div class="record_Top">
                <p>
                    卡门装修进度一览表</p>
            </div>
            <div style="float: left; line-height: 80px; font-size: 35px; text-align: center;
                margin: 30px auto">
                <span>正在施工数量</span> <span id="shopcount" style="background: red; -moz-border-radius: 50px;
                    -webkit-border-radius: 50px; border-radius: 50px; padding: 10px; margin: 10px;
                    font-size: 55px;">00</span>家
            </div>
            <div style="float: left; line-height: 80px; font-size: 35px; text-align: center;
                margin: 30px 60px;">
                <span>待进场数量</span> <span id="dincount" style="background: red; -moz-border-radius: 50px;
                    -webkit-border-radius: 50px; border-radius: 50px; padding: 10px; margin: 10px;
                    font-size: 55px;">00</span>家
            </div>
        </div>
        <div class="topRec_List">
            <dl>
                <dd>
                    序号</dd>
                <dd>
                    名称</dd>
                <dd>
                    进场时间</dd>
                <dd>
                    面积</dd>
                <dd>
                    交场时间</dd>
                <dd>
                    备注</dd>
            </dl>
            <div class="maquee">
                <ul id="shoplist">
                    <!--<li>
                        <div>
                            1</div>
                        <div>
                            岚县秀荣街店北京路265号店</div>
                        <div>
                            12/30 14:20</div>
                        <div>
                            300</div>
                        <div>
                            12/30 14:20</div>
                        <div>
                            12/30 14:20改为12/30 14:20</div>
                    </li>-->
                </ul>
            </div>
        </div>
        <div style="text-align: right; color: White; position: fixed; bottom: 0px; right: 0px;
            opacity: .70; font-size: 14px;">
            ©KM 本系统由卡门信息中心研发。
        </div>
    </div>
    <div class="slider-control left inactive">
    </div>
    <div class="slider-control right">
    </div>
    <ul class="slider-pagi">
    </ul>
    <div class="slider" id="datalist">
        <!--<div class="slide slide-0">
                <div class="slide__content">
                    <div class="topRec_List">
                        <div class="maquee">
                            <ul id="pageindex1">
                                <li>
                                    <div>
                                        1</div>
                                    <div>
                                        岚县秀荣街店北京路265号店</div>
                                    <div>
                                        12/30 14:20</div>
                                    <div>
                                        300</div>
                                    <div>
                                        12/30 14:20</div>
                                    <div>
                                        12/30 14:20改为12/30 14:20</div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slide slide-1 ">
                <div class="slide__content">
                   <div class="topRec_List">
                        <div class="maquee">
                            <ul id="pageindex2">
                                <li>
                                    <div>
                                        1</div>
                                    <div>
                                        岚县秀荣街店北京路265号店</div>
                                    <div>
                                        12/30 14:20</div>
                                    <div>
                                        300</div>
                                    <div>
                                        12/30 14:20</div>
                                    <div>
                                        12/30 14:20改为12/30 14:20</div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>-->
    </div>
    </div>
    <script src="js/jquery-1.8.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript" charset="utf-8">
        var pagecount = 0;
        var pageNum = 8;
        var autoSlideTimeout;
        $(function () {
            shoptincount();
            //shoptvlist();
            setInterval('shoptincount()', 240000);
            //setInterval('shoptvlist()', 240000);
        });
        function shoptincount() {
            document.getElementById("datalist").innerHTML = "";
            $.ajax({
                url: "http://219.135.99.176:58285/mobile/ajaxdata/Default.aspx",
                type: "POST",
                data: { aciton: 'shopincount' },
                timeout: 30000,
                dataType: "text",
                success: function (data) {
                    var msg = $.trim(data);
                    var html = '';
                    var all_str = "";
                    if (msg == "NO_DATA") {
                        alert("没有任何数据！");
                    } else {
                        var orderObj = JSON.parse(msg);
                        for (var i = 0; i < orderObj.length; i++) {
                            $("#shopcount").text(orderObj[i].shopcount);
                            $("#dincount").text(orderObj[i].dincount);

                            if ((orderObj[i].shopcount % pageNum) > 0) {
                                pagecount = parseInt(orderObj[i].allcount / pageNum) + 1;
                            } else
                                pagecount = orderObj[i].allcount / pageNum;
                        }

                        for (var k = 0; k < pagecount; k++) {
                            html = '<div class="slide slide-' + (k) + '">'
                                  + '  <div class="slide__content">'
                                   + '      <div class="topRec_List">'
                                   + '          <div class="maquee">'
                                    + '             <ul id="pageindex' + (k + 1) + '">'
                                    + '</ul></div></div></div></div>';

                            document.getElementById("datalist").innerHTML += html;
                            //$("#datalist").innerHTML = html;
                            shoptvlist("#pageindex" + (k + 1), k);
                        }
                        window.clearTimeout(autoSlideTimeout);
                        create_slider();
                    }
                },
                error: function () {
                    alert("通讯超时,请检查网络!");
                }
            });
        }
        function shoptvlist(obj, pageindex) {
            $.ajax({
                url: "http://219.135.99.176:58285/mobile/ajaxdata/Default.aspx",
                type: "POST",
                data: { aciton: 'shoptvpagelist', pageindex: pageindex, pagecount: pageNum },
                timeout: 30000,
                dataType: "text",
                success: function (data) {
                    var msg = $.trim(data);
                    var html = "";
                    if (msg == "NO_DATA") {
                        alert("没有任何数据！");
                    } else {
                        var orderObj = JSON.parse(msg);
                        for (var i = 0; i < orderObj.length; i++) {
                            html += '<li><div>' + orderObj[i].orderid + '</div>'
                                       + '<div>' + orderObj[i].shopname + '</div>'
                                       + '<div>' + orderObj[i].startdate + '</div>'
                                       + '<div>' + orderObj[i].shoparea + '</div>'
                                       + '<div>' + orderObj[i].enddate + '</div>'
                                       + '<div>' + orderObj[i].remark + '</div>'
                                     + '</li>'
                        }
                        $(obj).html(html);
                    }
                },
                error: function () {
                    alert("通讯超时,请检查网络!");
                }
            });
        }
    </script>
</body>
</html>
